home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 010a / csap311.zip / CSAP.DOC next >
Text File  |  1991-02-14  |  8KB  |  174 lines

  1.                  CSAP - Sort And Pack Directories
  2.             Version: 3.1.1    Date: February 14, 1991
  3.                      Author: Don A. Williams
  4.  
  5. ****************************  NOTICE!  **************************
  6. *   Contrary to the current trend  in  MS-DOS  software  this   *
  7. *   program,  for  whatever  it is worth,  is NOT copyrighted   *
  8. *   (with the exception of the runtime library  from  Borland   *
  9. *   International's  Turbo  C)!  The program,  in whole or in   *
  10. *   part,  may be used freely in any fashion  or  environment   *
  11. *   desired.  If  you  find this program to be useful to you,   *
  12. *   do NOT send any contribution to the author;  in the words   *
  13. *   of  Rick  Conn,   'Enjoy!'  However,   if  you  make  any   *
  14. *   improvements,  I would enjoy  receiving  a  copy  of  the   *
  15. *   modified  source.  I  can  be reached,  usually within 24   *
  16. *   hours,  by  messages  on  any  of  the  Phoenix  systems,   *
  17. *   particularly:                                               *
  18. *                                                               *
  19. *               Inn on the Park         [PCBOARD]               *
  20. *                   (602) 957-0631   1200/2400/9600             *
  21. *               The Wish Book           [PCBOARD]               *
  22. *                   (602) 252-4472   1200/2400                  *
  23. *               Technoids Anonymous     [PCBOARD]               *
  24. *                   (602) 899-4876   300/1200/2400 bps          *
  25. *                                                               *
  26. *   All can be reached through PC Pursuit.                      *
  27. *                                                               *
  28. *   or:                                                         *
  29. *                on CompuServ:           75410,543              *
  30. *                                                               *
  31. *   Every  effort has been made to avoid error and moderately   *
  32. *   extensive testing has been  performed  on  this  program,   *
  33. *   however, the author does not warrant it to be fit for any   *
  34. *   purpose  or  to  be  free  from  error  and disclaims any   *
  35. *   liability for actual or any other damage arising from the   *
  36. *   use of this program.                                        *
  37. *****************************************************************
  38.  
  39.  
  40. CSAP is a program to sort PC/MS-DOS directories in any  of  three
  41. orders   and  to  write  out  the  sorted  directory.   It  is  a
  42. replacement for my earlier SAP  which  was  written  in  assembly
  43. language  and  had  a  number of nasty bugs!  CSAP,  from version
  44. 2.0.2 up,  supports all of the  options  provided  by  SAP  3.01,
  45. however,  the  manner  of  specification  and  the  defaults  are
  46. different.  CSAP, from version 3.0.0 up, supports MS-DOS 4.xx and
  47. DR DOS  3.xx  large  partitions.  Also,  beginning  with  version
  48. 3.0.0,   CSAP   provides   the   optional   ability  to  truncate
  49. directories,  i.e.  return disk space not used by a directory  to
  50. the free disk space.
  51.  
  52.                         **** WARNING ****
  53.  
  54. Due to the fact that CSAP alters the directories and,  if the new 
  55. "truncate directories" option is selected,  the FATs on the disk, 
  56. it should NOT be executed out of a "shell" or in a  multi-tasking 
  57. environment!  
  58.  
  59. Changes between this documentation and  prior  versions  will  be
  60. indicated by 'change bars',  i.e.  the character '|' in the right
  61. margin.
  62.  
  63. There is a major exception to the sort.  An  MS-DOS  system  disk
  64. contains  two  files that MUST be the FIRST two files in the root
  65. directory.  These files contain MSDOS itself and the BIOS for the
  66. system.  Unfortunately, there is no sure way to distinguish these
  67. files from any other files although usually they have the  System
  68. and/or Hidden attributes and their Extension is 'SYS'.  If either
  69. of  the first two files in the root directory have the System and
  70. Hidden attributes,  CSAP will assume that the disk  is  a  system
  71. disk and will exclude the first two files from the sort.
  72.  
  73.  
  74. USAGE
  75.  
  76.         CSAP [options] [directory_name]
  77.                      or
  78.         CSAP [directory_name] [options]
  79.  
  80. Both parameters are optional and,  if neither is specified,  CSAP
  81. will sort the current directory and all elements in the directory
  82. tree  below  it  in  ascending order on the "Name" field.  As did
  83. SAP,  CSAP will sort all subdirectory entry  so  that  they  fall
  84. ahead  of  any  file  entries.  The directory_name parameter,  if
  85. supplied, specifies to CSAP the directory with which to start the
  86. sort.  Unless otherwise instructed, CSAP will sort that directory
  87. and all directories below it in the directory hierarchy.
  88.  
  89. If no disk is specified in the path name,  CSAP will work on  the 
  90. 'current' or 'default' disk, the disk shown in the MS-DOS prompt.  
  91. If the first character of the path name,  after the optional disk 
  92. specification,  is a '\'or a '/',  CSAP will assume that the path
  93. starts  at  the  root directory.  If the path name does not begin
  94. with a '\'or a '/',  SAP will assume that the path starts at  the
  95. 'current' directory and will prefix the specified path name  with 
  96. that  of  the  current  directory  before using it.  With version
  97. 2.1.2,  CSAP will accept either the '\' or the '/' characters  as
  98. separators in path specifications.
  99.  
  100. The options provide the user with a means of controlling the sort
  101. order.  They are as follows:
  102.  
  103.         -N    Sort on entry Name and Extension(the default).
  104.         -E    Sort on entry Extension then Name.
  105.         -D    Sort on entry Date/Time.
  106.         -S    Sort on entry Size.
  107.         -I    Invert the  sort  order,  i.e  sort  in  descending
  108.               order.
  109.         -L    Sort only one level of the hierarchy.
  110.         -R    Report the number of removed  "deleted"entries  and
  111.               the sector addresses of the directory.
  112.         -P    Do not remove "deleted" entries [reversed from SAP].
  113.         -V    Verify  (request  permission  from  the   operator)  
  114.               before sorting each directory.                       
  115.         -T    Truncate directories, i.e. return unused disk space
  116.               to the free space pool.
  117.  
  118. The  case  and order of the options is not important and they can
  119. be specified individually, i.e.
  120.  
  121.         CSAP -d -i
  122.  
  123. or combined, i.e.
  124.  
  125.         CSAP -di
  126.  
  127.  
  128. EXAMPLES:
  129.  
  130. Following are some simple examples of the use of CSAP:
  131.  
  132.         1.  A>CSAP
  133.  
  134.             This form of the CSAP command (with no  command  line
  135.             parameters)  will sort the "current" directory of the
  136.             "current" or "default" disk (disk A in this  example)
  137.             and  all  directories below it in the hierarchy.  The
  138.             directories  will  be  sorted  in  name   order   and
  139.             "deleted" entries will be removed.
  140.  
  141.         2.  A>CSAP -V
  142.  
  143.             This  form  of  the CSAP command is the same as in 1.
  144.             except that CSAP will  pause  for  user  confirmation
  145.             before sorting each directory.
  146.  
  147.         3.  A>CSAP \
  148.  
  149.             This  form  of  the CSAP command will sort the "Root"
  150.             directory of the "Current" disk, in ths example, A:\.
  151.             All directories on disk A would be sorted.
  152.  
  153.         4.  A> CSAP \ -L
  154.  
  155.             This form would, again,  sort the "Root" directory of
  156.             disk A but the "-L" option would limit the sorting to
  157.             just the "Root".
  158.  
  159.         5.  A>CSAP \ -R
  160.  
  161.             This  form  of the CSAP would sort all directories on
  162.             disk A and show,  for each  directory,  the  relative
  163.             sectors  occupied  by the directory and the number of
  164.             "erased" entries removed.
  165.  
  166.         6.  A>CSAP \ -DR
  167.  
  168.             This form of the CSAP command will,  again,  sort all 
  169.             of  the  directories  on  disk  A  but  this  time in 
  170.             Date/Time order.  The "R" option would, again,  cause 
  171.             the  relative  sectors occupied by each directory and 
  172.             the number of entries removed to be displayed.  
  173.  
  174.